import defaultData from "./data";
import Props from "../base/Props";
import {Row} from "antd";
import {Fragment} from "react";
import {WeaCheckbox, WeaHelpfulTip, WeaLocaleProvider} from "ecCom";

const getLabel = WeaLocaleProvider.getLabel;

export default class DescProps extends Props {
  renderContent() {
    const { divider } = this.props.data;

    return (
      <Fragment ecId={`${this && this.props && this.props.ecId || ''}_Fragment@5rx0x7`}>
        <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@d9hals`}>
          <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@4p5v8p`}
            id='text'
            content={getLabel('511771','显示分割线')}
            value={divider}
            onChange={this.handlePropChange('divider')}
          />
          <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@9aquen`}
            title={<div>{getLabel('511772','勾选「显示分割线」后，该描述字段的上方会出现一条虚线，可分隔表单上下文。')}</div>}
            placement="topRight"
          />
        </Row>
      </Fragment>
    )
  }
}

DescProps.defaultProps = {
  data: defaultData
};